<?
require("config.php");

$location_status .= " | Add";

$show_backnav = "features_menu";

$menuname = NULL;

$menutarget = NULL;


if (NULL!=$action){

   $field = array(
	"code", 
	"name",
	"description",
	"icon",
	"image", 
	);


   $content = array(
	$Code,
	$Name,
	$Description,
	$Icon_name,
	$Image_name,
	);

   myInsert($table,$field,$content);

	$dir = $table . "/";

	myUpload($Image,$Image_name,$dir);
	myUpload($Icon,$Icon_name,$dir);


   header("location:" . $rela_path . "share/msg.php?v=19");

   exit();

}

if (checkCode($table,$Code)){

	header("location:" . $rela_path . "share/msg.php?v=9001");
  
}

require($rela_path . "inc/header.php");

?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">&nbsp; </td>
  </tr>
  <tr> 
    <td><table width="75%">
          <tr> 
            <td class="tdheader">Code :</td>
            <td><?print($Code)?><br> 
              <!--hidden filed-->
              <input name="action" type="hidden" value="add"> <input name="Code" type="hidden" value="<?print($Code)?>"> 
            </td>
          </tr>
          <tr> 
            <td class="tdheader">Name :</td>
            <td><input type="text" class="text" name="Name" size="40"></td>
          </tr>
        <tr> 
          <td class="tdheader">Description :</td>
          <td><TEXTAREA NAME="Description" ROWS="6" COLS="50" class="text"><?print($Description)?></TEXTAREA></td>
        </tr>
        <tr> 
          <td class="tdheader">Icon :</td>
          <td><input name="Icon" type="File" class="text" size="40"></td>
        </tr>
          <tr> 
            <td class="tdheader">Image : </td>
            <td><input name="Image" type="File" class="text" size="40"></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><input name="image" type="image" onClick="Redirect('features_menu.php',1);return false;" src="../../images/bt_cancel.gif"> 
              <input name="image" type="image" src="../../images/bt_save.gif"> 
            </td>
          </tr>
        </table>
        <p><br>
        </p>
        <p> <br>
        <br>
        <br>
        </p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp; </p></td>
  </tr>
</table>
</form>
<?
require($rela_path . "inc/footer.php");
?>
